package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

cc_library(
    name = "json_object",
    srcs = ["json_object.cc"],
    hdrs = ["json_object.h"],
    include_prefix = "tink/jwt",
    deps = [
        ":json_util",
        "//util:status",
        "//util:statusor",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/strings:str_format",
        "@com_google_absl//absl/time",
        "@com_google_protobuf//:protobuf",
    ],
)

cc_library(
    name = "json_util",
    srcs = ["json_struct_util.cc"],
    hdrs = ["json_struct_util.h"],
    include_prefix = "tink/jwt",
    deps = [
        "//util:status",
        "//util:statusor",
        "@com_google_absl//absl/strings",
        "@com_google_protobuf//:protobuf",
    ],
)

# tests
cc_test(
    name = "json_object_test",
    size = "small",
    srcs = ["json_object_test.cc"],
    deps = [
        ":json_object",
        ":json_util",
        "//util:status",
        "//util:statusor",
        "//util:test_matchers",
        "//util:test_util",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/time",
        "@com_google_googletest//:gtest_main",
        "@com_google_protobuf//:protobuf",
    ],
)
